﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Students
{
    class Student
    {
        private int age;
        private string name;
        private string gender;

        public Student(int age, string name, string gender)
        {
            this.age = age;
            this.name = name;
            this.gender = gender;
        }

        public int Age 
        {
            get 
            {
                return age;
            }
            set 
            {
                if (value >= 7 && value <= 18)
                {
                    age = value;
                }
                else 
                {
                    throw new ArgumentOutOfRangeException("Student age is out of Range");
                }
            }
        }

        public string Name 
        {
            get 
            {
                return name;
            }
            set 
            {
                if (value.Length >= 10 && value.Length <= 50)
                {
                    name = value;
                }
                else 
                {
                    throw new ArgumentOutOfRangeException("Name is too long");
                }
            }
        }

        public string Gender 
        {
            get 
            {
                return gender;
            }
            set 
            {
                if (value == "female" || value == "male")
                {
                    gender = value;
                }
                else 
                {
                    throw new ArgumentOutOfRangeException("Tova uchilishte ne tolerira hermatofroditi!!!");
                }
            }
        }
    }
}
